package com.example.springboot_system.serviceImpl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.springboot_system.mapper.RoleMapper;
import com.example.springboot_system.pojo.Role;
import com.example.springboot_system.service.RoleService;
import com.example.springboot_system.utils.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpSession;
import java.util.List;

@Service
public class RoleSeviceImpl implements RoleService {
     @Autowired(required = false)
     private RoleMapper roleMapper;

  //查询所有的角色信息
    @Override
    public ResponseResult findAllRole(HttpSession session) {
        List<Role> list = roleMapper.findAllRole();
        session.setAttribute("roleList",list);
       return  new ResponseResult(200,"list");
    }
}

